/***********************************************************************************************************************
**	filename: serial_port.h
**	author: Echo Zhang @2021-05-08
**  e-mail: not_xx@126.com
***********************************************************************************************************************/

#ifndef SERIAL_PORT_INCLUDED
#define SERIAL_PORT_INCLUDED

#include "user_types.h"
#include <unistd.h>

typedef void (*SerialPort_Recv_FT)(const ui8 buffer[], Size_DT bufferLen);

int serial_port_init(const char *devName, ui32 baud);
void serial_port_send_data(const ui8 buffer[], Size_DT bufferLen);
void serial_port_routine_thread(void);
int serialport_readbyte(uint8_t *buf);

#endif	/* SERIAL_PORT_INCLUDED */

/***********************************************************************************************************************
**	endline
***********************************************************************************************************************/
